<?php
define('TIME_NOW',time());
ini_set ('zend.ze1_compatibility_mode','off');
putenv("Asia/Saigon");
date_default_timezone_set('Asia/Bangkok');

define('CHECK_DOMAIN', 0);//check valid domain (tuannk)

####################################################################################################################
define('ROOT_PATH', str_replace(array('core/'),array(''),strtr(dirname( __FILE__ ) ."/",array('\\'=>'/'))));
$webroot=str_replace('\\','/','http://'.$_SERVER['HTTP_HOST'].(dirname($_SERVER['SCRIPT_NAME'])?dirname($_SERVER['SCRIPT_NAME']):''));
$webroot.=$webroot[strlen($webroot)-1]!='/'?'/':'';
define('WEB_ROOT',$webroot);
unset($webroot);
####################################################################################################################

define('OID_URL','');
define('STATIC_URL','http://127.0.0.1/booking/');

define('WEB_DIR','/booking/');
define('WEB_DOMAIN','localhost');// bookingvccorp.vn
define('WEB_NAME','Booking');

define('DIR_CACHE', ROOT_PATH."_cache/");
define('DIR_MODULE', ROOT_PATH."modules/");
define('CACHE_ON', 1);
define('REWRITE_ON', 1);//rewrite URL

define('REG_ON',true); // Bat dang ky thanh vien
define('REG_CAPTRA',1);
define('OPENID_ON',1); // Bat dang nhap bang openid
define('USER_ACTIVE_ON',1); // Bat acctive user qua email

define( 'AD_POST_WAIT' , 0); //Chế độ chờ đăng tiếp tin
define( 'AD_COINCIDE' , 1); //Tin trùng
define( 'USE_CAPTCHA' , 1); //Bật captcha

//my server 
$server_list=array('127.0.0.1/booking/');

####################################################################################################################
define('TABLE_PREFIX',	'');

// Master server DB
define('DB_MASTER_SERVER',	'192.168.4.110');
define('DB_MASTER_USER',	'booking');
define('DB_MASTER_PASSWORD','z4VmXs3b2vyTWYnmYzY9');
define('DB_MASTER_NAME',	'booking');

// Slave server  DB (for replicate db)
define('_DB_REPLICATE',false);
define('DB_SLAVE_SERVER','');
define('DB_SLAVE_USER','');
define('DB_SLAVE_PASSWORD','');
define('DB_SLAVE_NAME','');

//Set default charset DB : LATIN / UTF8
define('DB_CHARSET','UTF8');


####################################################################################################################
//$img_server_extra = array(
$storage_server = array(
						1=>array(
					               'server_type'	=>'curl',//curl, ftp
									
					               'secret_key' 	=> '9e0d4158cc8ba8a04683156f69282c0c',//For CURL only
					               
					               'host'=>'192.168.8.15',
				                   'user'=>'',//For FTP only
				                   'pass'=>'',//For FTP only
				    			),
				    	/*999=>array(
					               'server_type'	=>'ftp',
									
					               //For curl
							        'secret_key' 	=> '',
							        
							        //For ftp
							        'host'=>'192.168.3.78',
				                    'user'=>'imgbooking',
				                    'pass'=>'2aGzQZDGEWZSwOD7zvj1',
				    			),*/
							);

//img server 
$img_server =   array(
                    1=>'hotelbooking.vcmedia.vn/',
                    /*999=>'imgbooking.todo.vn/',*/
					);
					
define('IMAGE_SERVER_NO',1);
define('IMG_UPLOAD_TYPE', 1); // 1 - cUrl; 2 - FTP
define('IMAGE_PATH','http://hotelbooking.vcmedia.vn');

define('UP_FOLDER','up_img_dev');
define('MAX_UPLOAD_SIZE','1024');//Kb
####################################################################################################################



####################################################################################################################
define('MEMCACHE_ON', 1);

$memcache_server =  array(
	array("host"=>"192.168.6.174","port"=>"12311"),
);

define('MEMCACHE_ID','booking');

//System Constants
//Session config
/*
 memcache - session memcache
 db - session database
 file - session file
*/ 
define( 'SESSION_TYPE' , 'memcache');

define('MEMCACHE_SESSION_HOST', "192.168.6.174");
define('MEMCACHE_SESSION_PORT', "12311");

define('_SESS_TABLE', "rongbay_sessions_mem");//rongbay_sessions
define('_SESS_TIME_EXPIRE', "10800");
####################################################################################################################


####################################################################################################################
//config mail
define('SMTP_HOST','192.168.4.21');
define('SMTP_PORT',25);
define('SMTP_METHOD','smtp');//'mail';for Old style PHP Mailer
define('SMTP_AUTH',true);
define('SMTP_FROM_EMAIL',"no-reply@rongbay.com");
define('SMTP_USER','');
define('SMTP_PASS','');
####################################################################################################################

define('EMAIL_ON', 				1);//Bật chức năng gửi mail
define('TEST_EMAIL','');
define('TEST_SEND_EMAIL', 	    1);

$email_dev = array(
    'tlkit158@gmail.com',
    'thinhlekhac@vccorp.vn'

);
// define email sting
$mail_sting_server = array(
    'server_type'	=>'curl',//curl, ftp
    'secret_key' 	=> 'c4520bc086986ede3425a8c5a13c6756',//For CURL only
    'domain'        =>'oka.todo.vn',
    'host'          =>'192.168.4.21',
    'port'          =>'28110'
);
#Config payment cho RB
define('RB_MERCHANT_SITE_CODE', 	'test');		//Mã merchante site cho SCS => Biến này được Soha Payment cung cấp cho merchant site
define('RB_SECURE_CODE', 			'123456789');	//Mật khẩu bảo mật cho SCS =>  Biến này được Soha Payment cung cấp  cho merchant site

define('SOHA_PAYMENT_CHECK_OUT_URL', 'http://muachungpay.vn/payment.php');		//URL checkout của Soha Payment
define('SOHA_PAYMENT_QUERY_URL', 	 'http://muachungpay.vn/payment_query.php');	//URL checkout của Soha Payment

#####################################################################################################################
// config redis
define('REDIS_ON', 0);
$host ='192.168.18.175';
$install = '6382';
$redis_cf = array(
    // config host
    'host' => $host,
    'install'=> $install,

    // config server and db
    'default' => array(
        'servers' => array('host' => $host, 'port' =>$install)),

    'hotel'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>1)),
    'hotel_review'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>2)),
    'images'   => array(
        'servers' => array('host' => $host, 'port' => $install,'db'=>14)),

);
?>